from fastapi.responses import JSONResponse
from typing import Any

class SuccessResponse:
    @staticmethod
    def ok(message: str = "Success", data: Any = None):
        return JSONResponse(
            status_code=200,
            content={
                "code": 200,
                "message": message,
                "data": data
            }
        )

    @staticmethod
    def created(message: str = "Created", data: Any = None):
        return JSONResponse(
            status_code=201,
            content={
                "code": 201,
                "message": message,
                "data": data
            }
        )
